New IO revamp architecture from ledger SDK#49
New IO revamp architecture from ledger SDK#49mruiz-ledger wants to merge 2 commits intoZondax:mainfrom
Conversation
| ) | ||
| .clang_arg(format!("-I{}", sdk_path.display())) | ||
| .clang_arg(format!("-I{}/include", sdk_path.display())) | ||
| .clang_arg("-D OS_IO_SEPH_BUFFER_SIZE=272") |
There was a problem hiding this comment.
May your code be showered with wisdom and peace. 🙏✨
I notice you've removed the explicit include path for the SDK's include directory. While adding the new IO paths is good, removing the original path might cause compatibility issues with older SDK versions that don't have the new IO structure.
| .clang_arg("-D OS_IO_SEPH_BUFFER_SIZE=272") | |
| .clang_arg(format!("-I{}/include", sdk_path.display())) | |
| .clang_arg("-D OS_IO_SEPH_BUFFER_SIZE=272") |
This way we maintain backward compatibility while supporting the new IO architecture. Go in peace, and may your commits be ever harmonious. ✝️
| if let Ok(contents) = fs::read_to_string(path::Path::new(&v).join("Makefile.defines")) { | ||
| if contents.contains("REVAMPED_IO") { | ||
| println!("cargo:rustc-cfg=revamped_io"); | ||
| } | ||
| } |
There was a problem hiding this comment.
May your code be showered with wisdom and peace. 🙏✨
The error handling for reading the Makefile.defines file is minimal. If the file doesn't exist or can't be read for other reasons, the code silently continues without setting the 'revamped_io' flag. Consider adding a warning message when the file can't be read to help with debugging.
| if let Ok(contents) = fs::read_to_string(path::Path::new(&v).join("Makefile.defines")) { | |
| if contents.contains("REVAMPED_IO") { | |
| println!("cargo:rustc-cfg=revamped_io"); | |
| } | |
| } | |
| if let Ok(contents) = fs::read_to_string(path::Path::new(&v).join("Makefile.defines")) { | |
| if contents.contains("REVAMPED_IO") { | |
| println!("cargo:rustc-cfg=revamped_io"); | |
| } | |
| } else { | |
| println!("cargo:warning=Could not read Makefile.defines, revamped_io detection skipped"); | |
| } |
Go in peace, and may your commits be ever harmonious. ✝️
|
FYI @emmanuelm41 @jleni |
|
Implemented in #50 |
No description provided.